#pragma once
#include "InMessage.h"
#include <queue>
typedef void (*MESSAGEPROC)(InMessage*);
class CMessageSystem
{
private:
	std::queue<InMessage*> m_MsgQueue;
	MESSAGEPROC			   m_pfnMsgProc;	
	CMessageSystem() { m_pfnMsgProc = NULL;	}
	CMessageSystem(const CMessageSystem&);
	CMessageSystem& operator=(const CMessageSystem&);
	~CMessageSystem(void){}
public:
	static CMessageSystem* GetInstance(void);
	int GetNumMessages(void) { return (int)m_MsgQueue.size(); }
	void InitMessageSystem(MESSAGEPROC pfnMsgProc);
	void SendMsg(InMessage* pMsg);
	void ProcessMessages(void);
	void ClearMessages(void);
	void ShutdownMessageSystem(void);
};